# encoding: utf-8

#from django.contrib import admin
import xadmin
from xadmin import views
from django.core import urlresolvers
from .models import *
from xadmin.layout import Main, TabHolder, Tab, Fieldset, Row, Col, AppendedText, Side
from xadmin.plugins.inline import Inline
from xadmin.plugins.batch import BatchChangeAction
from xadmin.models import UserWidget,UserSettings
from django.contrib.auth.models import User,Permission,Group
#import sms_ChinaMobile
from django.conf import settings
import xadmin.plugins.auth

import logging
logger = logging.getLogger(__name__)


from django.contrib.auth.models import User,Permission


class xPermissionAdmin(object):
    list_display=('name','codename','content_type',)

    search_fields = ('name','codename',)


xadmin.site.register(quanxian_Yuding,xPermissionAdmin)


class xUserAdmin(object):
    style_fields = {'groups': 'm2m_transfer'}
    list_display=('username','groups',)

    #search_fields = ('name','codename',)


xadmin.site.register(user_Yuding,xUserAdmin)


